package org.hxzon.demo.jni;

import org.hxzon.util.BytesUtil;

public class JniDemo2 {
    static {
        System.loadLibrary("JniDemo2");
    }

    public native MyObject buildMyObject(int myInt, long myLong, String myString, byte[] myArray);

    public static void main(String args[]) {
        byte[] testBytes = BytesUtil.fromHexString("a1b2c3d4e5f6");
        MyObject obj = new JniDemo2().buildMyObject(12, 50, "hello你好", testBytes);
        System.out.println(obj.getMyInt());
        System.out.println(obj.getMyLong());
        System.out.println(obj.getMyString());
        System.out.println(obj.getMyString2());
        System.out.println(BytesUtil.toHexString(obj.getMyArray()));
        System.out.println(obj.isMyBoolean());
    }

}
